package com.byb.server.domain;

import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import org.hibernate.annotations.Cache;
import org.hibernate.annotations.CacheConcurrencyStrategy;
import org.springframework.data.elasticsearch.annotations.Document;

import javax.persistence.*;
import java.io.Serializable;
import java.util.Objects;

/**
 * 保险公司
 */
@ApiModel(description = "保险公司")
@Entity
@Table(name = "isurer")
@Cache(usage = CacheConcurrencyStrategy.NONSTRICT_READ_WRITE)
@Document(indexName = "isurer")
public class Isurer implements Serializable {

    private static final long serialVersionUID = 1L;

    @Id
    @GeneratedValue(strategy = GenerationType.IDENTITY)
    private Long id;

    /**
     * logo
     */
    @ApiModelProperty(value = "logo")
    @Column(name = "company_image")
    private String companyImage;

    /**
     * 背景图
     */
    @ApiModelProperty(value = "背景图")
    @Column(name = "background_img")
    private String backgroundImg;

    /**
     * 公司名称
     */
    @ApiModelProperty(value = "公司名称")
    @Column(name = "corporate_name")
    private String corporateName;

    /**
     * 简介
     */
    @ApiModelProperty(value = "简介")
    @Lob
    @Column(name = "sybopsis")
    private String sybopsis;

    /**
     * 股东梗概
     */
    @ApiModelProperty(value = "股东梗概")
    @Column(name = "shareholder_info_abstract")
    private String shareholderInfoAbstract;

    /**
     * 股东简介
     */
    @ApiModelProperty(value = "股东简介")
    @Lob
    @Column(name = "shareholder_info")
    private String shareholderInfo;

    /**
     * 公司运营情况简介
     */
    @ApiModelProperty(value = "公司运营情况简介")
    @Column(name = "company_operations_abstract")
    private String companyOperationsAbstract;

    /**
     * 公司运营情况
     */
    @ApiModelProperty(value = "公司运营情况")
    @Lob
    @Column(name = "company_operations")
    private String companyOperations;

    /**
     * 理赔能力简介
     */
    @ApiModelProperty(value = "理赔能力简介")
    @Column(name = "claim_settling_capacity_abstract")
    private String claimSettlingCapacityAbstract;

    /**
     * 理赔能力
     */
    @ApiModelProperty(value = "理赔能力")
    @Lob
    @Column(name = "claim_settling_capacity")
    private String claimSettlingCapacity;

    // jhipster-needle-entity-add-field - Jhipster will add fields here, do not remove
    public Long getId() {
        return id;
    }

    public void setId(Long id) {
        this.id = id;
    }

    public String getCompanyImage() {
        return companyImage;
    }

    public Isurer companyImage(String companyImage) {
        this.companyImage = companyImage;
        return this;
    }

    public void setCompanyImage(String companyImage) {
        this.companyImage = companyImage;
    }

    public String getBackgroundImg() {
        return backgroundImg;
    }

    public Isurer backgroundImg(String backgroundImg) {
        this.backgroundImg = backgroundImg;
        return this;
    }

    public void setBackgroundImg(String backgroundImg) {
        this.backgroundImg = backgroundImg;
    }

    public String getCorporateName() {
        return corporateName;
    }

    public Isurer corporateName(String corporateName) {
        this.corporateName = corporateName;
        return this;
    }

    public void setCorporateName(String corporateName) {
        this.corporateName = corporateName;
    }

    public String getSybopsis() {
        return sybopsis;
    }

    public Isurer sybopsis(String sybopsis) {
        this.sybopsis = sybopsis;
        return this;
    }

    public void setSybopsis(String sybopsis) {
        this.sybopsis = sybopsis;
    }

    public String getShareholderInfoAbstract() {
        return shareholderInfoAbstract;
    }

    public Isurer shareholderInfoAbstract(String shareholderInfoAbstract) {
        this.shareholderInfoAbstract = shareholderInfoAbstract;
        return this;
    }

    public void setShareholderInfoAbstract(String shareholderInfoAbstract) {
        this.shareholderInfoAbstract = shareholderInfoAbstract;
    }

    public String getShareholderInfo() {
        return shareholderInfo;
    }

    public Isurer shareholderInfo(String shareholderInfo) {
        this.shareholderInfo = shareholderInfo;
        return this;
    }

    public void setShareholderInfo(String shareholderInfo) {
        this.shareholderInfo = shareholderInfo;
    }

    public String getCompanyOperationsAbstract() {
        return companyOperationsAbstract;
    }

    public Isurer companyOperationsAbstract(String companyOperationsAbstract) {
        this.companyOperationsAbstract = companyOperationsAbstract;
        return this;
    }

    public void setCompanyOperationsAbstract(String companyOperationsAbstract) {
        this.companyOperationsAbstract = companyOperationsAbstract;
    }

    public String getCompanyOperations() {
        return companyOperations;
    }

    public Isurer companyOperations(String companyOperations) {
        this.companyOperations = companyOperations;
        return this;
    }

    public void setCompanyOperations(String companyOperations) {
        this.companyOperations = companyOperations;
    }

    public String getClaimSettlingCapacityAbstract() {
        return claimSettlingCapacityAbstract;
    }

    public Isurer claimSettlingCapacityAbstract(String claimSettlingCapacityAbstract) {
        this.claimSettlingCapacityAbstract = claimSettlingCapacityAbstract;
        return this;
    }

    public void setClaimSettlingCapacityAbstract(String claimSettlingCapacityAbstract) {
        this.claimSettlingCapacityAbstract = claimSettlingCapacityAbstract;
    }

    public String getClaimSettlingCapacity() {
        return claimSettlingCapacity;
    }

    public Isurer claimSettlingCapacity(String claimSettlingCapacity) {
        this.claimSettlingCapacity = claimSettlingCapacity;
        return this;
    }

    public void setClaimSettlingCapacity(String claimSettlingCapacity) {
        this.claimSettlingCapacity = claimSettlingCapacity;
    }
    // jhipster-needle-entity-add-getters-setters - Jhipster will add getters and setters here, do not remove

    @Override
    public boolean equals(Object o) {
        if (this == o) {
            return true;
        }
        if (o == null || getClass() != o.getClass()) {
            return false;
        }
        Isurer isurer = (Isurer) o;
        if (isurer.getId() == null || getId() == null) {
            return false;
        }
        return Objects.equals(getId(), isurer.getId());
    }

    @Override
    public int hashCode() {
        return Objects.hashCode(getId());
    }

    @Override
    public String toString() {
        return "Isurer{" +
            "id=" + getId() +
            ", companyImage='" + getCompanyImage() + "'" +
            ", backgroundImg='" + getBackgroundImg() + "'" +
            ", corporateName='" + getCorporateName() + "'" +
            ", sybopsis='" + getSybopsis() + "'" +
            ", shareholderInfoAbstract='" + getShareholderInfoAbstract() + "'" +
            ", shareholderInfo='" + getShareholderInfo() + "'" +
            ", companyOperationsAbstract='" + getCompanyOperationsAbstract() + "'" +
            ", companyOperations='" + getCompanyOperations() + "'" +
            ", claimSettlingCapacityAbstract='" + getClaimSettlingCapacityAbstract() + "'" +
            ", claimSettlingCapacity='" + getClaimSettlingCapacity() + "'" +
            "}";
    }
}
